<form id="table_memcache">
<table  cellpadding="0" cellspacing="0" class="t_stpi" style= "table-layout:fixed ">
            <tr>
              <th width="50">属性</th>
              <th width="50">值</th>
            </tr>
            <tr>
              <td  align="center">表名</td>
              <td  align="center"><input type="text" name="name" value="{TINPUT.table}" readonly="readonly" /></td>
            </tr>
            <tr>
              <td  align="center">开启缓存</td>
              <td  align="center"><input type="checkbox" name="memcache_open" value="1"  /></td>
            </tr>
            <tr>
              <td  align="center">缓存时间</td>
              <td  align="center"><input type="text" name="memcache_time" value="{memcache_time}"  /></td>
            </tr>
            <tr>
              <td  align="center">刷新时间</td>
              <td  align="center"><input type="text" name="refresh" value="{refresh}"  /></td>
            </tr>
            <tr>
              <td  align="center">操作</td>
              <td  align="center"><input style="background-color:red"  type="button" value="修改" onclick="memcache_cache_set();"/></td>
            </tr>
</table>
</form>
<script type="text/javascript" src="/res/js/lib/jquery.form.js"></script>
<script>
    var check = '{memcache_open}'*1;
    if (check){
        check = true;
    }else {
        check = false;
    }
    $("input[name='memcache_open']").attr('checked',check);

    function memcache_cache_set(){

    	$("#table_memcache").ajaxSubmit({
 		        url:'/admin/a-table/setMemcache?sys_ajax=1',
 		        dataType:'json',
 		        success:function(json){
	               if (json.success){
	            	   alert(json.msg);
		               }else {
		            	     alert(json.msg);
			               }
  		           
	            },
	            error:function(e){
	            	  alert(e.responseText);
		            }

        	});

    }
</script>